3.7.43 \(\int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+C \sec ^2(c+d x)) \, dx\) [643]

Optimal. Leaf size=77 \[ \frac {1}{2} b (A+2 C) x+\frac {a (2 A+3 C) \sin (c+d x)}{3 d}+\frac {A b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d} \]

[Out]

1/2*b*(A+2*C)*x+1/3*a*(2*A+3*C)*sin(d*x+c)/d+1/2*A*b*cos(d*x+c)*sin(d*x+c)/d+1/3*a*A*cos(d*x+c)^2*sin(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4160, 4132, 2717, 4130, 8} \begin {gather*} \frac {a (2 A+3 C) \sin (c+d x)}{3 d}+\frac {a A \sin (c+d x) \cos ^2(c+d x)}{3 d}+\frac {A b \sin (c+d x) \cos (c+d x)}{2 d}+\frac {1}{2} b x (A+2 C) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Sec[c + d*x])*(A + C*Sec[c + d*x]^2),x]

[Out]

(b*(A + 2*C)*x)/2 + (a*(2*A + 3*C)*Sin[c + d*x])/(3*d) + (A*b*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (a*A*Cos[c +
d*x]^2*Sin[c + d*x])/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4130

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e
+ f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rule 4132

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 4160

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b
_.) + (a_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Dist[1/(d*n), Int[(d*Csc[e +
f*x])^(n + 1)*Simp[A*b*n + a*(C*n + A*(n + 1))*Csc[e + f*x] + b*C*n*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b,
 d, e, f, A, C}, x] && LtQ[n, -1]

Rubi steps

\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) \left (-3 A b-a (2 A+3 C) \sec (c+d x)-3 b C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) \left (-3 A b-3 b C \sec ^2(c+d x)\right ) \, dx+\frac {1}{3} (a (2 A+3 C)) \int \cos (c+d x) \, dx\\ &=\frac {a (2 A+3 C) \sin (c+d x)}{3 d}+\frac {A b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}+\frac {1}{2} (b (A+2 C)) \int 1 \, dx\\ &=\frac {1}{2} b (A+2 C) x+\frac {a (2 A+3 C) \sin (c+d x)}{3 d}+\frac {A b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 64, normalized size = 0.83 \begin {gather*} \frac {6 A b c+6 A b d x+12 b C d x+3 a (3 A+4 C) \sin (c+d x)+3 A b \sin (2 (c+d x))+a A \sin (3 (c+d x))}{12 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Sec[c + d*x])*(A + C*Sec[c + d*x]^2),x]

[Out]

(6*A*b*c + 6*A*b*d*x + 12*b*C*d*x + 3*a*(3*A + 4*C)*Sin[c + d*x] + 3*A*b*Sin[2*(c + d*x)] + a*A*Sin[3*(c + d*x
)])/(12*d)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 68, normalized size = 0.88

method result size
derivativedivides \(\frac {\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+A b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \sin \left (d x +c \right )+C b \left (d x +c \right )}{d}\) \(68\)
default \(\frac {\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+A b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \sin \left (d x +c \right )+C b \left (d x +c \right )}{d}\) \(68\)
risch \(\frac {A b x}{2}+b x C +\frac {3 a A \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (d x +c \right ) a C}{d}+\frac {a A \sin \left (3 d x +3 c \right )}{12 d}+\frac {A b \sin \left (2 d x +2 c \right )}{4 d}\) \(68\)
norman \(\frac {\left (\frac {1}{2} A b +C b \right ) x +\left (\frac {1}{2} A b +C b \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {1}{2} A b +C b \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {1}{2} A b +C b \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-A b -2 C b \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-A b -2 C b \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (2 a A -A b +2 a C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 a A +A b +2 a C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 A \left (4 a -3 b \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 A \left (4 a +3 b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 a \left (A -3 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}\) \(273\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/3*a*A*(2+cos(d*x+c)^2)*sin(d*x+c)+A*b*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+a*C*sin(d*x+c)+C*b*(d*x
+c))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 67, normalized size = 0.87 \begin {gather*} -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b - 12 \, {\left (d x + c\right )} C b - 12 \, C a \sin \left (d x + c\right )}{12 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*b - 12*(d*x + c)*C*b - 1
2*C*a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 2.53, size = 56, normalized size = 0.73 \begin {gather*} \frac {3 \, {\left (A + 2 \, C\right )} b d x + {\left (2 \, A a \cos \left (d x + c\right )^{2} + 3 \, A b \cos \left (d x + c\right ) + 2 \, {\left (2 \, A + 3 \, C\right )} a\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/6*(3*(A + 2*C)*b*d*x + (2*A*a*cos(d*x + c)^2 + 3*A*b*cos(d*x + c) + 2*(2*A + 3*C)*a)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*sec(d*x+c))*(A+C*sec(d*x+c)**2),x)

[Out]

Integral((A + C*sec(c + d*x)**2)*(a + b*sec(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (69) = 138\).
time = 0.42, size = 153, normalized size = 1.99 \begin {gather*} \frac {3 \, {\left (A b + 2 \, C b\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))*(A+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/6*(3*(A*b + 2*C*b)*(d*x + c) + 2*(6*A*a*tan(1/2*d*x + 1/2*c)^5 + 6*C*a*tan(1/2*d*x + 1/2*c)^5 - 3*A*b*tan(1/
2*d*x + 1/2*c)^5 + 4*A*a*tan(1/2*d*x + 1/2*c)^3 + 12*C*a*tan(1/2*d*x + 1/2*c)^3 + 6*A*a*tan(1/2*d*x + 1/2*c) +
 6*C*a*tan(1/2*d*x + 1/2*c) + 3*A*b*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d

________________________________________________________________________________________

Mupad [B]
time = 3.53, size = 67, normalized size = 0.87 \begin {gather*} \frac {A\,b\,x}{2}+C\,b\,x+\frac {3\,A\,a\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {A\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(A + C/cos(c + d*x)^2)*(a + b/cos(c + d*x)),x)

[Out]

(A*b*x)/2 + C*b*x + (3*A*a*sin(c + d*x))/(4*d) + (C*a*sin(c + d*x))/d + (A*a*sin(3*c + 3*d*x))/(12*d) + (A*b*s
in(2*c + 2*d*x))/(4*d)

________________________________________________________________________________________